export interface IResult {
  code: string | number
  message: string
}

export namespace sms {
  export interface IParms {
    phone: string
    verifyCode: string
  }
  export interface IRes extends IResult {
    result: any
  }
}

export namespace addUser {
  export interface IParms {
    phone: string
    code: string
  }
  export interface IRes extends IResult {
    result: {
      secret?: string
      token?: string
    }
  }
}

export namespace login {
  export interface IParms {
    phone: string
    password: string
  }
  export interface IRes extends IResult {
    result: {
      token: string
    }
  }
}

export namespace register {
  export interface IParms {
    secret: string
    nickname: string
    password: string
    password1: string
  }
  export interface IRes extends IResult {
    result: {
      token: string
    }
  }
}

export namespace checkMs {
  export interface IParms {
    phone: string
    code: string
  }
  export interface IRes extends IResult {
    result: {
      secret: string
    }
  }
}

export namespace forgetPassword {
  export interface IParms {
    secret: string
    password: string
    password1: string
  }
  export interface IRes extends IResult {
    result: any
  }
}
